package com.dormitory_15.dormitory.Service.Impl.DormitoryManager;

import com.dormitory_15.dormitory.Dao.DormitoryManager.DormitoryManagerDao;
import com.dormitory_15.dormitory.Entity.DormitoryManager;
import com.dormitory_15.dormitory.Service.DormitoryManager.DormitoryMangerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class DormitoryManagerImpl implements DormitoryMangerService {
    @Autowired
    private DormitoryManagerDao dormitoryManagerDao;
    @Override
    public DormitoryManager login(String username, String password) {
        if(username == null || password == null){
            return null;
        }
        DormitoryManager login = dormitoryManagerDao.login(username, password);
        if(login != null){
            return login;
        }
        return null;
    }
}
